package com.huangjue.backend.dto.aiChatClient;


import lombok.Data;

@Data
public final class AiRequestMessage {

    private final String role;
    private final String content;

    // 全参数构造函数
    public AiRequestMessage(String role, String content) {
        if (role == null || content == null || content.isBlank()) {
            throw new IllegalArgumentException("role 与 content 均不能为空");
        }
        this.role = role;
        this.content = content;
    }

    // Getter 方法
    public String role() {
        return role;
    }

    public String content() {
        return content;
    }


    // toString
    @Override
    public String toString() {
        return "Message[" +
                "role=" + role +
                ", content='" + content + '\'' +
                ']';
    }

}